#!/bin/sh
#
# ip -- get the ip of a specified lab
#
# Copyright (C) 2016-2021 Wu Zhangjin <falcon@ruma.tech>
#

TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd)"
. "$TOP_DIR"/tools/docker/config >/dev/null

# Check status
lab_id=$(docker ps -f name=$CONTAINER_NAME -f status=running -q)
[ -z "$lab_id" ] && err_print "$LAB_NAME is not running." && exit 1

get_var VNC_IP

echo $VNC_IP
